<?php

namespace app\admin\service;

use app\admin\model\UM as UM;
use ShidianUtil\Exception\DataNotExistException;
use app\admin\dao\TempTokenDao;
use app\common\model\TempToken;
use think\Collection;

/**
 * Class TempService
 * @package app\admin\service
 */
class TempService
{
    // dao
    private TempTokenDao $tempTokenDao;

    public function __construct(TempTokenDao $tempTokenDao)
    {
        $this->tempTokenDao = $tempTokenDao;
    }

    /**
     *
     * @param UM|null $user
     * @param $startTime
     * @param $endTime
     * @param $kw
     * @param int|null $page
     * @param int|null $page_size
     * @return array
     */
    public function index(?UM $user, $startTime, $endTime, $kw, ?int $page = null, ?int $page_size = null): array
    {
        //这里如果要修改查询，建议把查询放到dao层去
        return $this->tempTokenDao->listLawCases($startTime, $endTime, $kw, $page, $page_size);
    }

}
